package rdgl.compiler;

import java.util.ArrayList;
import java.util.List;

public class Range {
	private List<String> range;
	private Type type = Type.Length; 
	
	public enum Type {
		Length,
		Range
	}
	
	public Range() {
		this.range = new ArrayList<String>();
	}

	public void add(List<String> values) {
		this.range.addAll(values);	
	}
	
	public int getSize() {
		return this.range.size();
	}
	
	public String get(int index) {
		return this.range.get(index);
	}
	
	public Type getType() {
		return this.type;
	}
	
	public void setType(Type type) {
		this.type = type;
	}
	
	public String toString() {
		String value = new String();
		for (String v : range) {
			value += v + ',';
		}
		return value;
	}
}
